package com.gg.demo;
import java.util.Scanner;
public class TestDemo6 {
    public static void main(String[] args) {
    /*
     * x,y x=0 y=0 x>0 y=x*x x<0 y=2*x+1
     * x键盘上给值x
     *
     * */
    int x;
    Scanner scan = new Scanner(System.in);
    x = scan.nextInt();
        if (x > 0) {
        System.out.println(x * x);
    } else if (x > 0) {
        System.out.println(2 * x + 1);
    } else if (x == 0) {
        System.out.println(0);
    }
    ///////////////
        if (x > 0) {
        System.out.println(x * x);
    }
        if (x < 0) {
        System.out.println(2 * x + 1);
    }
        if (x == 0) {
        System.out.println(0);
    }
}
}
